﻿<!DOCTYPE html>
<html lang="zxx">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <meta content="" name="description">
    <meta content="" name="keywords">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="HandheldFriendly" content="true">
    <meta content="telephone=no" name="format-detection">
    <!-- favicon -->
    <link rel="shortcut icon" type="image/png" href="favicon.png" />
    <!--[if (gt IE 9)|!(IE)]><!-->
    <!-- custom CSS -->
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <!-- END custom CSS -->
    <!--<![endif]-->
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
    <title>联系我们</title>
</head>
<body>
{include file="public/header"}
<!-- END header -->
<!-- content-->
<!-- title -->

<!-- END title -->
<div class="wrap wrap_gray pt20">
    <div class="container">
        <div class="row">
            <div class="wrap-thumbnail">
                <div class="thumbnail">
                    <div class="thumbnail__news news">
                        {$detail.other_content}
                    </div>
                </div>
            </div>
            <div class="comments__form">
                <p class="comments__title" style="font-size: 15px;">意见反馈</p>
                <form action="#" method="POST" id="sendFeedback">
                    <div class="form-group">
                        <input type="text" style="width: 200px;" class="form-control" placeholder="姓名" name="feedback_user_name" id="feedback_user_name">
                    </div>
                    <div class="form-group">
                        <textarea name="feedback_content" id="input" class="form-control" rows="7" required="required" placeholder="请输入您要反馈的内容"></textarea>
                    </div>
                    <button type="button" class="btn btn-comment">提交</button>
                </form>
            </div>
        </div>
    </div>
</div>
<!-- END content-->
<!-- Footer -->
{include file="public/footer"}
</div>
<!-- END Footer -->
<!-- All JavaScript libraries -->
</body>
</html>
<script>
    var feedback_user_name; // 姓名
    var feedback_content; // 反馈内容
    // 发布评论
    $('.btn-comment').click(function () {
        feedback_user_name = $('#feedback_user_name').val();
        feedback_content = $('#input').val();
        if(feedback_user_name.trim() == ''){
            alert('请填写姓名');
            return;
        }
        if(feedback_content.trim() == ''){
            alert('请填写内容');
            return;
        }
        $.ajax({
            url:'{:url("index/Other/sendFeedback")}',
            type:'post',
            data:$('#sendFeedback').serialize(),
            dataType:'json',
            success:function (data) {
                if(data.status == 200){
                    alert(data.msg);
                    window.location.reload();
                }else {
                    alert(data.msg);
                }
            }
        })
    });
</script>

